function form_block (id, content) {
    var str = '<li><div class="block-item-wrapper">'
    +'<div class="block-item-drag-handler">'
        +'<div id="' + id + '_block-item" class="block-item">'
            +'<div id="'+id +'_block-item-content" class="block-item-content">' + content + '</div>'
            +'<div class="block-item-properties">'
                +'<div class="block-item-ctrl"> '
                    +'<span class="block-small-btn-base block-item-remove-btn-wrap">'
                        +'<a href="#" class="block-small-btn-hlight block-item-remove-btn" title="Remove this note."></a>'
                    +'</span>'
                +'</div> '
                +'<div class="block-item-tag-bar"><span class="float-left">Tags:</span>'
                    +'<span class="block-item-tag-btn-wrap block-small-btn-base ">'

                        +'<a href="#" class="block-small-btn-hlight block-item-tag-btn" title="Add/Edit tags for this note."></a>'
                    +'</span>'
                +'</div>'
                +'<div class="float-fix"></div>  '
            +'</div>'
        +'</div></div></div></li>';
    return str;
}

function form_note (id, title) {
    var str =  '<div id="'+ id + '_note-item" class="note-item"'
          + '><a href="#" class="note-item-icon-wrap" ><img class="note-item-icon" alt="Computer" src="imgs/icons/64x64/note.png"/></a>'
          + '<div class="note-item-title">' + title 
          + '</div></div>';
    return str;
}

function form_note_view () {
    var str='<div class="content-view note-view">'
        +   '<div class="note-view-content"></div>'
        +   '</div>';
    return str;
}


function cut_content(obj, len) {
    return $(obj).text().substr(0, len);
}


function count2size (max, min, x) { 
    return 12 / (max_count-min_count) * x + (12-2*max_count/(max_count-min_count))
}

